// Copyright 2012 Google Inc. All Rights Reserved.

package com.google.appengine.preferencessync;

import android.os.Binder;

/**
 * Custom merge handler class for the client. Returm object of this class in the onBind function
 * in the merge service defined by the user.
 */
public abstract class MergeHandler extends Binder {

  /**
   * Called when the merge phase is stated during sync. 
   * 
   * @param preferencesName preference name for which the merge phase is started.
   */
  public abstract void onMergeStarted(String preferencesName);

  /**
   * Called when the key is update in the preferences of the current merge phase.
   * 
   * @param key
   * @param object
   */
  public abstract void onUpdate(String key, Object object);

  /**
   * Called when the key is update in the preferences of the current merge phase.
   * 
   * @param key
   */
  public abstract void onDelete(String key);

  /**
   * Called when merge is finished for the preferences name.
   */
  public abstract void onMergeFinished();
}
